package com.audaque.springboot.foshanupload.web.webdemo.controller;

import java.util.Date;


import com.audaque.springboot.foshanupload.log.anno.WebLogAnno;
import com.audaque.springboot.foshanupload.web.anno.RAnno;
import com.audaque.springboot.foshanupload.web.webdemo.model.dto.DateJacksonSerializeDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zgb
 * @desc ...
 * @date 2022-01-25 22:13:31
 */
@Slf4j
@RestController
@RequestMapping("rAnno")
public class RAnnoController {
    @RAnno
    @WebLogAnno
    @GetMapping("/string")
    public String string() throws Exception {
        return "string1";
    }


    @WebLogAnno
    @GetMapping("/no")
    public String no() throws Exception {
        return "no";
    }

    @RAnno
    @WebLogAnno
    @GetMapping("/dateJacksonSerializeMpgtDto")
    public DateJacksonSerializeDto dateJacksonSerializeMpgtDto() throws Exception {
        DateJacksonSerializeDto dateJacksonSerializeDto = new DateJacksonSerializeDto();
        dateJacksonSerializeDto.setId(0L);
        dateJacksonSerializeDto.setUpdateDate(new Date());
        dateJacksonSerializeDto.setEventDate(new Date());
        dateJacksonSerializeDto.setCreateDate(new Date());
        return dateJacksonSerializeDto;

    }


}
